package com.fr.report.core;

import com.fr.base.FRContext;
import com.fr.base.Inter;
import com.fr.base.core.FT;
import com.fr.base.core.list.IntList;
import com.fr.report.CellElement;
import com.fr.report.FloatElement;
import com.fr.report.Margin;
import com.fr.report.PageInfo;
import com.fr.report.PaperSetting;
import com.fr.report.PaperSize;
import com.fr.report.ReportPage;
import com.fr.report.ReportPageAttr;
import com.fr.report.ReportSettings;
import com.fr.report.cellElement.CellPageAttr;
import java.awt.Point;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;

public class PaginateReportPageGenerator
{
  private PaginateReport showReport;
  private ReportSettings reportSettings;
  private DynamicValueList columnWidthList;
  private DynamicValueList rowHeightList;
  private List pageColumnIndexList = new ArrayList();
  private List pageRowIndexList = new ArrayList();
  private int pageCount = 0;
  private List reportPageList = new ArrayList();
  private PaperSetting setting;

  public PaginateReportPageGenerator(PaginateReport paramPaginateReport, PaperSetting paramPaperSetting)
  {
    this.showReport = paramPaginateReport;
    this.reportSettings = ReportUtils.getReportSettings(this.showReport);
    this.columnWidthList = ReportHelper.getColumnWidthList(paramPaginateReport);
    this.rowHeightList = ReportHelper.getRowHeightList(paramPaginateReport);
    this.setting = paramPaperSetting;
    dealWithPageInfor();
    generatePages();
  }

  public ReportPage[] getReportPages()
  {
    return ((ReportPage[])this.reportPageList.toArray(new ReportPage[this.reportPageList.size()]));
  }

  private void dealWithPageInfor()
  {
    int i;
    int j;
    if (this.setting == null)
    {
      i = 2147483647;
      j = 2147483647;
    }
    else
    {
      PaperSize localPaperSize = this.setting.getPaperSize();
      Margin localMargin = this.setting.getMargin();
      double d1 = localPaperSize.getWidth();
      double d2 = localPaperSize.getHeight();
      if (this.setting.getOrientation() == 1)
      {
        d1 = localPaperSize.getHeight();
        d2 = localPaperSize.getWidth();
      }
      i = (int)((d1 - localMargin.getLeft() - localMargin.getRight()) * 96.0D);
      j = (int)((d2 - localMargin.getTop() - localMargin.getBottom() - this.reportSettings.getHeaderHeight() - this.reportSettings.getFooterHeight()) * 96.0D);
    }
    if ((i <= 0) || (j <= 0))
      throw new RuntimeException("paperPaintWidth/paperPaintHeight is less than 0");
    int k = 0;
    int l = 0;
    Iterator localIterator1 = this.showReport.floatIterator();
    while (localIterator1.hasNext())
    {
      localObject1 = (FloatElement)localIterator1.next();
      localObject2 = ReportHelper.calculateLastColumnAndRowOfFloatElement(this.showReport, (FloatElement)localObject1);
      k = Math.max(k, localObject2[0].x + 1);
      l = Math.max(l, localObject2[0].y + 1);
    }
    k = Math.max(k, this.showReport.getColumnCount());
    l = Math.max(l, this.showReport.getRowCount());
    Object localObject1 = new IntList();
    Object localObject2 = new IntList();
    Iterator localIterator2 = this.showReport.cellIterator();
    while (true)
    {
      CellElement localCellElement;
      int i1;
      do
        do
        {
          while (true)
          {
            if (!(localIterator2.hasNext()))
              break label445;
            localCellElement = (CellElement)localIterator2.next();
            localObject3 = localCellElement.getCellPageAttr();
            if (localObject3 != null)
              break;
          }
          if (((CellPageAttr)localObject3).isPageAfterColumn())
            if ((i1 = localCellElement.getColumn() + localCellElement.getColumnSpan()) > 0)
              ((IntList)localObject1).add(i1);
          if (((CellPageAttr)localObject3).isPageBeforeColumn())
            if ((i1 = localCellElement.getColumn()) > 0)
              ((IntList)localObject1).add(i1);
          if (((CellPageAttr)localObject3).isPageAfterRow())
            if ((i1 = localCellElement.getRow() + localCellElement.getRowSpan()) > 0)
              ((IntList)localObject2).add(i1);
        }
        while (!(((CellPageAttr)localObject3).isPageBeforeRow()));
      while ((i1 = localCellElement.getRow()) <= 0);
      ((IntList)localObject2).add(i1);
    }
    label445: Object localObject3 = this.showReport.getReportPageAttr();
    if ((localObject3 == null) || (((ReportPageAttr)localObject3).isUnUsed()))
    {
      this.pageColumnIndexList.add(new IdxHeaderFooter(0));
      int i2 = 0;
      int i3 = 0;
      for (int i4 = 0; i4 < k; ++i4)
      {
        i2 += (i3 = this.columnWidthList.get(i4));
        if ((i2 > i) || (((IntList)localObject1).contain(i4)))
        {
          if (((IdxHeaderFooter)this.pageColumnIndexList.get(this.pageColumnIndexList.size() - 1)).getIndex() == i4)
            throw new DeathCycleException("Death cycle exist in paginating　dealing with columnIndex: " + i4);
          this.pageColumnIndexList.add(new IdxHeaderFooter(i4));
          i2 = i3;
        }
      }
      this.pageColumnIndexList.add(new IdxHeaderFooter(k));
      this.pageRowIndexList.add(new IdxHeaderFooter(0));
      i2 = 0;
      i3 = 0;
      for (i4 = 0; i4 < l; ++i4)
      {
        i2 += (i3 = this.rowHeightList.get(i4));
        if ((i2 > j) || (((IntList)localObject2).contain(i4)))
        {
          if (((IdxHeaderFooter)this.pageRowIndexList.get(this.pageRowIndexList.size() - 1)).getIndex() == i4)
            throw new DeathCycleException("Death cycle exist in paginating　dealing with rowIndex: " + i4);
          this.pageRowIndexList.add(new IdxHeaderFooter(i4));
          i2 = i3;
        }
      }
      label1669: label1945: label1072: label2547: this.pageRowIndexList.add(new IdxHeaderFooter(l));
    }
    else
    {
      int i8;
      int i14;
      int i15;
      int[] arrayOfInt = this.showReport.get_col_oi_int_list();
      IntList localIntList1 = new IntList();
      IntList localIntList2 = new IntList();
      int i5 = 0;
      IntList localIntList3 = null;
      for (int i6 = ((ReportPageAttr)localObject3).getRepeatFooterColumnFrom(); i6 <= ((ReportPageAttr)localObject3).getRepeatFooterColumnTo(); ++i6)
        for (int i7 = 0; i7 < k; ++i7)
          if (arrayOfInt[i7] == i6)
          {
            i5 += this.columnWidthList.get(i7);
            if (localIntList3 == null)
              localIntList3 = new IntList();
            localIntList3.add(i7);
            localIntList2.add(i6);
            break;
          }
      this.pageColumnIndexList.add(new IdxHeaderFooter(0, null, localIntList3));
      if (i5 > i)
        throw new RuntimeException("repeated column width is larger than paper width.");
      for (i6 = 0; i6 < k; ++i6)
      {
        int i10;
        if (localIntList2.contain(arrayOfInt[i6]))
        {
          if (((IntList)localObject1).contain(i6))
            break label1072:
          IntList localIntList4 = ((IdxHeaderFooter)this.pageColumnIndexList.get(this.pageColumnIndexList.size() - 1)).getFooterRepeatList();
          if (localIntList4 != null)
          {
            i10 = localIntList4.indexOf(i6);
            if (i10 != -1)
              localIntList4.remove(i10);
          }
        }
        else
        {
          i5 += this.columnWidthList.get(i6);
          if ((i5 > i) || (((IntList)localObject1).contain(i6)))
          {
            if (((IdxHeaderFooter)this.pageColumnIndexList.get(this.pageColumnIndexList.size() - 1)).getIndex() == i6)
              throw new DeathCycleException("Death cycle exist in paginating　dealing with columnIndex: " + i6);
            i8 = 1;
            for (i10 = i6; i10 < k; ++i10)
              if (!(localIntList2.contain(arrayOfInt[i10])))
              {
                i8 = 0;
                break;
              }
            if ((i8 != 0) && (this.pageColumnIndexList.size() > 0))
              while (true)
              {
                if (i6 >= k)
                  break label1669;
                localIntList6 = ((IdxHeaderFooter)this.pageColumnIndexList.get(this.pageColumnIndexList.size() - 1)).getFooterRepeatList();
                if (localIntList6 != null)
                {
                  int i12 = localIntList6.indexOf(i6);
                  if (i12 != -1)
                    localIntList6.remove(i12);
                }
                ++i6;
              }
            localIntList1.clear();
            localIntList2.clear();
            i5 = 0;
            i8 = i6;
            IntList localIntList6 = null;
            IntList localIntList8 = null;
            while ((i6 < k) && (((ReportPageAttr)localObject3).getRepeatHeaderColumnFrom() <= arrayOfInt[i6]) && (arrayOfInt[i6] <= ((ReportPageAttr)localObject3).getRepeatHeaderColumnTo()))
            {
              i5 += this.columnWidthList.get(i6);
              localIntList1.add(arrayOfInt[i6]);
              ++i6;
            }
            if (i6 >= k)
            {
              if (i5 > i)
                throw new RuntimeException("repeated column width is larger than paper width.");
              this.pageColumnIndexList.add(new IdxHeaderFooter(i8, localIntList6, localIntList8));
              break;
            }
            for (i14 = ((ReportPageAttr)localObject3).getRepeatHeaderColumnFrom(); i14 <= ((ReportPageAttr)localObject3).getRepeatHeaderColumnTo(); ++i14)
              for (i15 = i8 - 1; i15 >= 0; --i15)
                if (arrayOfInt[i15] == i14)
                {
                  if (localIntList1.contain(i14))
                    break;
                  i5 += this.columnWidthList.get(i15);
                  if (localIntList6 == null)
                    localIntList6 = new IntList();
                  localIntList6.add(i15);
                  break;
                }
            for (i14 = ((ReportPageAttr)localObject3).getRepeatFooterColumnFrom(); i14 <= ((ReportPageAttr)localObject3).getRepeatFooterColumnTo(); ++i14)
              for (i15 = i6 + 1; i15 < k; ++i15)
                if (arrayOfInt[i15] == i14)
                {
                  i5 += this.columnWidthList.get(i15);
                  if (localIntList8 == null)
                    localIntList8 = new IntList();
                  localIntList8.add(i15);
                  localIntList2.add(i14);
                  break;
                }
            this.pageColumnIndexList.add(new IdxHeaderFooter(i8, localIntList6, localIntList8));
            i5 += this.columnWidthList.get(i6);
            if (i5 > i)
              throw new RuntimeException("repeated column width is larger than paper width.");
          }
        }
      }
      this.pageColumnIndexList.add(new IdxHeaderFooter(k));
      arrayOfInt = this.showReport.get_row_oi_int_list();
      localIntList1 = new IntList();
      localIntList2 = new IntList();
      i5 = 0;
      localIntList3 = null;
      for (i6 = ((ReportPageAttr)localObject3).getRepeatFooterRowFrom(); i6 <= ((ReportPageAttr)localObject3).getRepeatFooterRowTo(); ++i6)
        for (i8 = 0; i8 < l; ++i8)
          if (arrayOfInt[i8] == i6)
          {
            i5 += this.rowHeightList.get(i8);
            if (localIntList3 == null)
              localIntList3 = new IntList();
            localIntList3.add(i8);
            localIntList2.add(i6);
            break;
          }
      this.pageRowIndexList.add(new IdxHeaderFooter(0, null, localIntList3));
      if (i5 > j)
        throw new RuntimeException("repeated row height is larger than paper height.");
      for (i6 = 0; i6 < l; ++i6)
      {
        int i11;
        if (localIntList2.contain(arrayOfInt[i6]))
        {
          if (((IntList)localObject2).contain(i6))
            break label1945:
          IntList localIntList5 = ((IdxHeaderFooter)this.pageRowIndexList.get(this.pageRowIndexList.size() - 1)).getFooterRepeatList();
          if (localIntList5 != null)
          {
            i11 = localIntList5.indexOf(i6);
            if (i11 != -1)
              localIntList5.remove(i11);
          }
        }
        else
        {
          i5 += this.rowHeightList.get(i6);
          if ((i5 > j) || (((IntList)localObject2).contain(i6)))
          {
            if (((IdxHeaderFooter)this.pageRowIndexList.get(this.pageRowIndexList.size() - 1)).getIndex() == i6)
              throw new DeathCycleException("Death cycle exist in paginating　dealing with rowIndex: " + i6);
            int i9 = 1;
            for (i11 = i6; i11 < l; ++i11)
              if (!(localIntList2.contain(arrayOfInt[i11])))
              {
                i9 = 0;
                break;
              }
            if ((i9 != 0) && (this.pageRowIndexList.size() > 0))
              while (true)
              {
                if (i6 >= l)
                  break label2547;
                localIntList7 = ((IdxHeaderFooter)this.pageRowIndexList.get(this.pageRowIndexList.size() - 1)).getFooterRepeatList();
                if (localIntList7 != null)
                {
                  int i13 = localIntList7.indexOf(i6);
                  if (i13 != -1)
                    localIntList7.remove(i13);
                }
                ++i6;
              }
            localIntList1.clear();
            localIntList2.clear();
            i5 = 0;
            i9 = i6;
            IntList localIntList7 = null;
            IntList localIntList9 = null;
            while ((i6 < l) && (((ReportPageAttr)localObject3).getRepeatHeaderRowFrom() <= arrayOfInt[i6]) && (arrayOfInt[i6] <= ((ReportPageAttr)localObject3).getRepeatHeaderRowTo()))
            {
              i5 += this.rowHeightList.get(i6);
              localIntList1.add(arrayOfInt[i6]);
              ++i6;
            }
            if (i6 >= l)
            {
              if (i5 > j)
                throw new RuntimeException("repeated row height is larger than paper height.");
              this.pageRowIndexList.add(new IdxHeaderFooter(i9, localIntList7, localIntList9));
              break;
            }
            for (i14 = ((ReportPageAttr)localObject3).getRepeatHeaderRowFrom(); i14 <= ((ReportPageAttr)localObject3).getRepeatHeaderRowTo(); ++i14)
              for (i15 = i9 - 1; i15 >= 0; --i15)
                if (arrayOfInt[i15] == i14)
                {
                  if (localIntList1.contain(i14))
                    break;
                  i5 += this.rowHeightList.get(i15);
                  if (localIntList7 == null)
                    localIntList7 = new IntList();
                  localIntList7.add(i15);
                  break;
                }
            for (i14 = ((ReportPageAttr)localObject3).getRepeatFooterRowFrom(); i14 <= ((ReportPageAttr)localObject3).getRepeatFooterRowTo(); ++i14)
              for (i15 = i6 + 1; i15 < l; ++i15)
                if (arrayOfInt[i15] == i14)
                {
                  i5 += this.rowHeightList.get(i15);
                  if (localIntList9 == null)
                    localIntList9 = new IntList();
                  localIntList9.add(i15);
                  localIntList2.add(i14);
                  break;
                }
            this.pageRowIndexList.add(new IdxHeaderFooter(i9, localIntList7, localIntList9));
            i5 += this.rowHeightList.get(i6);
            if (i5 > j)
              throw new RuntimeException("repeated row height is larger than paper height.");
          }
        }
      }
      this.pageRowIndexList.add(new IdxHeaderFooter(l));
    }
    this.pageCount = ((this.pageColumnIndexList.size() - 1) * (this.pageRowIndexList.size() - 1));
  }

  private void generatePages()
  {
    int l;
    int i1;
    ArrayList localArrayList1;
    int i4;
    int i5;
    int i6;
    ArrayList localArrayList2;
    IntList localIntList3;
    int i7;
    int i8;
    int i9;
    int i = 0;
    switch (this.reportSettings.getPageOrder())
    {
    case 0:
      j = 1;
      k = this.pageColumnIndexList.size();
      while (true)
      {
        IntList localIntList1;
        if (j >= k)
          break label1854;
        l = ((IdxHeaderFooter)this.pageColumnIndexList.get(j - 1)).getIndex();
        i1 = ((IdxHeaderFooter)this.pageColumnIndexList.get(j)).getIndex();
        localArrayList1 = new ArrayList();
        if (((IdxHeaderFooter)this.pageColumnIndexList.get(j - 1)).getHeadRepeatList() != null)
        {
          localIntList1 = ((IdxHeaderFooter)this.pageColumnIndexList.get(j - 1)).getHeadRepeatList();
          i4 = 0;
          i5 = -1;
          for (i6 = 0; i6 < localIntList1.size(); ++i6)
            if (i6 == 0)
            {
              i5 = localIntList1.get(i6);
              ++i4;
            }
            else if (localIntList1.get(i6) == i5 + i4)
            {
              ++i4;
            }
            else
            {
              localArrayList1.add(new FT(i5, i5 + i4));
              i5 = localIntList1.get(i6);
              i4 = 1;
            }
          if ((i5 != -1) && (i4 > 0))
            localArrayList1.add(new FT(i5, i5 + i4));
        }
        if (i1 > l)
          localArrayList1.add(new FT(l, i1));
        if (((IdxHeaderFooter)this.pageColumnIndexList.get(j - 1)).getFooterRepeatList() != null)
        {
          localIntList1 = ((IdxHeaderFooter)this.pageColumnIndexList.get(j - 1)).getFooterRepeatList();
          i4 = 0;
          i5 = -1;
          for (i6 = 0; i6 < localIntList1.size(); ++i6)
            if (i6 == 0)
            {
              i5 = localIntList1.get(i6);
              ++i4;
            }
            else if (localIntList1.get(i6) == i5 + i4)
            {
              ++i4;
            }
            else
            {
              localArrayList1.add(new FT(i5, i5 + i4));
              i5 = localIntList1.get(i6);
              i4 = 1;
            }
          if ((i5 != -1) && (i4 > 0))
            localArrayList1.add(new FT(i5, i5 + i4));
        }
        int i2 = 1;
        i4 = this.pageRowIndexList.size();
        while (i2 < i4)
        {
          i5 = ((IdxHeaderFooter)this.pageRowIndexList.get(i2 - 1)).getIndex();
          i6 = ((IdxHeaderFooter)this.pageRowIndexList.get(i2)).getIndex();
          localArrayList2 = new ArrayList();
          if (((IdxHeaderFooter)this.pageRowIndexList.get(i2 - 1)).getHeadRepeatList() != null)
          {
            localIntList3 = ((IdxHeaderFooter)this.pageRowIndexList.get(i2 - 1)).getHeadRepeatList();
            i7 = 0;
            i8 = -1;
            for (i9 = 0; i9 < localIntList3.size(); ++i9)
              if (i9 == 0)
              {
                i8 = localIntList3.get(i9);
                ++i7;
              }
              else if (localIntList3.get(i9) == i8 + i7)
              {
                ++i7;
              }
              else
              {
                localArrayList2.add(new FT(i8, i8 + i7));
                i8 = localIntList3.get(i9);
                i7 = 1;
              }
            if ((i8 != -1) && (i7 > 0))
              localArrayList2.add(new FT(i8, i8 + i7));
          }
          if (i6 > i5)
            localArrayList2.add(new FT(i5, i6));
          if (((IdxHeaderFooter)this.pageRowIndexList.get(i2 - 1)).getFooterRepeatList() != null)
          {
            localIntList3 = ((IdxHeaderFooter)this.pageRowIndexList.get(i2 - 1)).getFooterRepeatList();
            i7 = 0;
            i8 = -1;
            for (i9 = 0; i9 < localIntList3.size(); ++i9)
              if (i9 == 0)
              {
                i8 = localIntList3.get(i9);
                ++i7;
              }
              else if (localIntList3.get(i9) == i8 + i7)
              {
                ++i7;
              }
              else
              {
                localArrayList2.add(new FT(i8, i8 + i7));
                i8 = localIntList3.get(i9);
                i7 = 1;
              }
            if ((i8 != -1) && (i7 > 0))
              localArrayList2.add(new FT(i8, i8 + i7));
          }
          dealWithReportPage(localArrayList2, localArrayList1, i, j, i2);
          ++i;
          ++i2;
        }
        ++j;
      }
    }
    int j = 1;
    int k = this.pageRowIndexList.size();
    while (j < k)
    {
      IntList localIntList2;
      l = ((IdxHeaderFooter)this.pageRowIndexList.get(j - 1)).getIndex();
      i1 = ((IdxHeaderFooter)this.pageRowIndexList.get(j)).getIndex();
      localArrayList1 = new ArrayList();
      if (((IdxHeaderFooter)this.pageRowIndexList.get(j - 1)).getHeadRepeatList() != null)
      {
        localIntList2 = ((IdxHeaderFooter)this.pageRowIndexList.get(j - 1)).getHeadRepeatList();
        i4 = 0;
        i5 = -1;
        for (i6 = 0; i6 < localIntList2.size(); ++i6)
          if (i6 == 0)
          {
            i5 = localIntList2.get(i6);
            ++i4;
          }
          else if (localIntList2.get(i6) == i5 + i4)
          {
            ++i4;
          }
          else
          {
            localArrayList1.add(new FT(i5, i5 + i4));
            i5 = localIntList2.get(i6);
            i4 = 1;
          }
        if ((i5 != -1) && (i4 > 0))
          localArrayList1.add(new FT(i5, i5 + i4));
      }
      if (i1 > l)
        localArrayList1.add(new FT(l, i1));
      if (((IdxHeaderFooter)this.pageRowIndexList.get(j - 1)).getFooterRepeatList() != null)
      {
        localIntList2 = ((IdxHeaderFooter)this.pageRowIndexList.get(j - 1)).getFooterRepeatList();
        i4 = 0;
        i5 = -1;
        for (i6 = 0; i6 < localIntList2.size(); ++i6)
          if (i6 == 0)
          {
            i5 = localIntList2.get(i6);
            ++i4;
          }
          else if (localIntList2.get(i6) == i5 + i4)
          {
            ++i4;
          }
          else
          {
            localArrayList1.add(new FT(i5, i5 + i4));
            i5 = localIntList2.get(i6);
            i4 = 1;
          }
        if ((i5 != -1) && (i4 > 0))
          localArrayList1.add(new FT(i5, i5 + i4));
      }
      int i3 = 1;
      i4 = this.pageColumnIndexList.size();
      while (i3 < i4)
      {
        i5 = ((IdxHeaderFooter)this.pageColumnIndexList.get(i3 - 1)).getIndex();
        i6 = ((IdxHeaderFooter)this.pageColumnIndexList.get(i3)).getIndex();
        localArrayList2 = new ArrayList();
        if (((IdxHeaderFooter)this.pageColumnIndexList.get(i3 - 1)).getHeadRepeatList() != null)
        {
          localIntList3 = ((IdxHeaderFooter)this.pageColumnIndexList.get(i3 - 1)).getHeadRepeatList();
          i7 = 0;
          i8 = -1;
          for (i9 = 0; i9 < localIntList3.size(); ++i9)
            if (i9 == 0)
            {
              i8 = localIntList3.get(i9);
              ++i7;
            }
            else if (localIntList3.get(i9) == i8 + i7)
            {
              ++i7;
            }
            else
            {
              localArrayList2.add(new FT(i8, i8 + i7));
              i8 = localIntList3.get(i9);
              i7 = 1;
            }
          if ((i8 != -1) && (i7 > 0))
            localArrayList2.add(new FT(i8, i8 + i7));
        }
        if (i6 > i5)
          localArrayList2.add(new FT(i5, i6));
        if (((IdxHeaderFooter)this.pageColumnIndexList.get(i3 - 1)).getFooterRepeatList() != null)
        {
          localIntList3 = ((IdxHeaderFooter)this.pageColumnIndexList.get(i3 - 1)).getFooterRepeatList();
          i7 = 0;
          i8 = -1;
          for (i9 = 0; i9 < localIntList3.size(); ++i9)
            if (i9 == 0)
            {
              i8 = localIntList3.get(i9);
              ++i7;
            }
            else if (localIntList3.get(i9) == i8 + i7)
            {
              ++i7;
            }
            else
            {
              localArrayList2.add(new FT(i8, i8 + i7));
              i8 = localIntList3.get(i9);
              i7 = 1;
            }
          if ((i8 != -1) && (i7 > 0))
            localArrayList2.add(new FT(i8, i8 + i7));
        }
        dealWithReportPage(localArrayList1, localArrayList2, i, i3, j);
        ++i;
        ++i3;
      }
      ++j;
    }
    label1854: FRContext.getLogger().log(Level.INFO, Inter.getLocText("INFO-Page_is_Generated"));
  }

  private void dealWithReportPage(List paramList1, List paramList2, int paramInt1, int paramInt2, int paramInt3)
  {
    ReportPage localReportPage = new ReportPage(this.showReport, new PageInfo(), this.setting, (FT[])paramList1.toArray(new FT[paramList1.size()]), (FT[])paramList2.toArray(new FT[paramList2.size()]), paramInt2, paramInt3);
    int i = this.showReport.getReportSettings().getFirstPageNumber();
    int j = paramInt1 + i;
    int k = this.pageCount;
    localReportPage.setCurrentPageNumber(j);
    localReportPage.getPageInfo().setTotalPages(k);
    this.reportPageList.add(localReportPage);
  }

  private static class IdxHeaderFooter
  {
    private int idx;
    private IntList headerRepeatList;
    private IntList footerRepeatList;

    public IdxHeaderFooter(int paramInt)
    {
      this(paramInt, null, null);
    }

    public IdxHeaderFooter(int paramInt, IntList paramIntList1, IntList paramIntList2)
    {
      this.idx = paramInt;
      this.headerRepeatList = paramIntList1;
      this.footerRepeatList = paramIntList2;
    }

    public int getIndex()
    {
      return this.idx;
    }

    public IntList getHeadRepeatList()
    {
      return this.headerRepeatList;
    }

    public IntList getFooterRepeatList()
    {
      return this.footerRepeatList;
    }
  }
}